<script type="module">
  import {ref} from 'vue'

  export default{
    setup(){
      let count = ref(0);

      let increase = function() {
        count.value++;
      }

      function decrease() {
        count.value--;
      }

      return{
        count, increase, decrease
      }
    }
  }
</script>

<template>
  <div>
    <button v-on:click="increase()">加一</button>
    {{ count }}
    <button @click="decrease()">减一</button>
  </div>
</template>

<style scoped>
  
</style>
